package com.seabook.imgdownloader.srchandler;

import org.apache.commons.lang.StringUtils;
import org.htmlparser.Tag;
import org.htmlparser.tags.InputTag;

public class CLNetImgSrcHandler implements ImgSrcHandler {

	public String handleImageSrc(Tag tag) {
		if (tag instanceof InputTag) {
			String imageTagSrcAttr = tag.getAttribute("src");
			
			if (StringUtils.isNotEmpty(imageTagSrcAttr)) {
				return imageTagSrcAttr;
			}
		}
		return null;
	}

}
